{"ast":null,"code":"import { genComponentStyleHook, mergeToken, PresetColors } from '../../theme/internal';\nimport capitalize from '../../_util/capitalize';\nimport { resetComponent } from '../../style';\nconst genTagStatusStyle = (token, status, cssVariableType) => {\n  const capitalizedCssVariableType = capitalize(cssVariableType);\n  return {\n    [`${token.componentCls}-${status}`]: {\n      color: token[`color${cssVariableType}`],\n      background: token[`color${capitalizedCssVariableType}Bg`],\n      borderColor: token[`color${capitalizedCssVariableType}Border`]\n    }\n  };\n};\n// FIXME: special preset colors\nconst genTagColorStyle = token => PresetColors.reduce((prev, colorKey) => {\n  const lightColor = token[`${colorKey}-1`];\n  const lightBorderColor = token[`${colorKey}-3`];\n  const darkColor = token[`${colorKey}-6`];\n  const textColor = token[`${colorKey}-7`];\n  return Object.assign(Object.assign({}, prev), {\n    [`${token.componentCls}-${colorKey}`]: {\n      color: textColor,\n      background: lightColor,\n      borderColor: lightBorderColor\n    },\n    [`${token.componentCls}-${colorKey}-inverse`]: {\n      color: token.colorTextLightSolid,\n      background: darkColor,\n      borderColor: darkColor\n    }\n  });\n}, {});\nconst genBaseStyle = token => {\n  const {\n    paddingXXS,\n    lineWidth,\n    tagPaddingHorizontal\n  } = token;\n  const paddingInline = tagPaddingHorizontal - lineWidth;\n  const iconMarginInline = paddingXXS - lineWidth;\n  return {\n    // Result\n    [token.componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n      display: 'inline-block',\n      height: 'auto',\n      marginInlineEnd: token.marginXS,\n      paddingInline,\n      fontSize: token.tagFontSize,\n      lineHeight: `${token.tagLineHeight}px`,\n      whiteSpace: 'nowrap',\n      background: token.tagDefaultBg,\n      border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,\n      borderRadius: token.borderRadiusSM,\n      opacity: 1,\n      transition: `all ${token.motionDurationMid}`,\n      textAlign: 'start',\n      // RTL\n      '&&-rtl': {\n        direction: 'rtl'\n      },\n      '&, a, a:hover': {\n        color: token.tagDefaultColor\n      },\n      [`${token.componentCls}-close-icon`]: {\n        marginInlineStart: iconMarginInline,\n        color: token.colorTextDescription,\n        fontSize: token.tagIconSize,\n        cursor: 'pointer',\n        transition: `all ${token.motionDurationMid}`,\n        '&:hover': {\n          color: token.colorTextHeading\n        }\n      },\n      [`&&-has-color`]: {\n        borderColor: 'transparent',\n        [`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: {\n          color: token.colorTextLightSolid\n        }\n      },\n      [`&-checkable`]: {\n        backgroundColor: 'transparent',\n        borderColor: 'transparent',\n        cursor: 'pointer',\n        '&:not(&-checked):hover': {\n          color: token.colorPrimary,\n          backgroundColor: token.colorFillSecondary\n        },\n        '&:active, &-checked': {\n          color: token.colorTextLightSolid\n        },\n        '&-checked': {\n          backgroundColor: token.colorPrimary,\n          '&:hover': {\n            backgroundColor: token.colorPrimaryHover\n          }\n        },\n        '&:active': {\n          backgroundColor: token.colorPrimaryActive\n        }\n      },\n      [`&-hidden`]: {\n        display: 'none'\n      },\n      // To ensure that a space will be placed between character and `Icon`.\n      [`> ${token.iconCls} + span, > span + ${token.iconCls}`]: {\n        marginInlineStart: paddingInline\n      }\n    })\n  };\n};\n// ============================== Export ==============================\nexport default genComponentStyleHook('Tag', token => {\n  const {\n    fontSize,\n    lineHeight,\n    lineWidth,\n    fontSizeIcon\n  } = token;\n  const tagHeight = Math.round(fontSize * lineHeight);\n  const tagFontSize = token.fontSizeSM;\n  const tagLineHeight = tagHeight - lineWidth * 2;\n  const tagDefaultBg = token.colorFillAlter;\n  const tagDefaultColor = token.colorText;\n  const tagToken = mergeToken(token, {\n    tagFontSize,\n    tagLineHeight,\n    tagDefaultBg,\n    tagDefaultColor,\n    tagIconSize: fontSizeIcon - 2 * lineWidth,\n    tagPaddingHorizontal: 8 // Fixed padding.\n  });\n\n  return [genBaseStyle(tagToken), genTagColorStyle(tagToken), genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')];\n});","map":{"version":3,"names":["genComponentStyleHook","mergeToken","PresetColors","capitalize","resetComponent","genTagStatusStyle","token","status","cssVariableType","capitalizedCssVariableType","componentCls","color","background","borderColor","genTagColorStyle","reduce","prev","colorKey","lightColor","lightBorderColor","darkColor","textColor","Object","assign","colorTextLightSolid","genBaseStyle","paddingXXS","lineWidth","tagPaddingHorizontal","paddingInline","iconMarginInline","display","height","marginInlineEnd","marginXS","fontSize","tagFontSize","lineHeight","tagLineHeight","whiteSpace","tagDefaultBg","border","lineType","colorBorder","borderRadius","borderRadiusSM","opacity","transition","motionDurationMid","textAlign","direction","tagDefaultColor","marginInlineStart","colorTextDescription","tagIconSize","cursor","colorTextHeading","iconCls","backgroundColor","colorPrimary","colorFillSecondary","colorPrimaryHover","colorPrimaryActive","fontSizeIcon","tagHeight","Math","round","fontSizeSM","colorFillAlter","colorText","tagToken"],"sources":["/data/messenger.client/node_modules/antd/es/tag/style/index.js"],"sourcesContent":["import { genComponentStyleHook, mergeToken, PresetColors } from '../../theme/internal';\nimport capitalize from '../../_util/capitalize';\nimport { resetComponent } from '../../style';\nconst genTagStatusStyle = (token, status, cssVariableType) => {\n  const capitalizedCssVariableType = capitalize(cssVariableType);\n  return {\n    [`${token.componentCls}-${status}`]: {\n      color: token[`color${cssVariableType}`],\n      background: token[`color${capitalizedCssVariableType}Bg`],\n      borderColor: token[`color${capitalizedCssVariableType}Border`]\n    }\n  };\n};\n// FIXME: special preset colors\nconst genTagColorStyle = token => PresetColors.reduce((prev, colorKey) => {\n  const lightColor = token[`${colorKey}-1`];\n  const lightBorderColor = token[`${colorKey}-3`];\n  const darkColor = token[`${colorKey}-6`];\n  const textColor = token[`${colorKey}-7`];\n  return Object.assign(Object.assign({}, prev), {\n    [`${token.componentCls}-${colorKey}`]: {\n      color: textColor,\n      background: lightColor,\n      borderColor: lightBorderColor\n    },\n    [`${token.componentCls}-${colorKey}-inverse`]: {\n      color: token.colorTextLightSolid,\n      background: darkColor,\n      borderColor: darkColor\n    }\n  });\n}, {});\nconst genBaseStyle = token => {\n  const {\n    paddingXXS,\n    lineWidth,\n    tagPaddingHorizontal\n  } = token;\n  const paddingInline = tagPaddingHorizontal - lineWidth;\n  const iconMarginInline = paddingXXS - lineWidth;\n  return {\n    // Result\n    [token.componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n      display: 'inline-block',\n      height: 'auto',\n      marginInlineEnd: token.marginXS,\n      paddingInline,\n      fontSize: token.tagFontSize,\n      lineHeight: `${token.tagLineHeight}px`,\n      whiteSpace: 'nowrap',\n      background: token.tagDefaultBg,\n      border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,\n      borderRadius: token.borderRadiusSM,\n      opacity: 1,\n      transition: `all ${token.motionDurationMid}`,\n      textAlign: 'start',\n      // RTL\n      '&&-rtl': {\n        direction: 'rtl'\n      },\n      '&, a, a:hover': {\n        color: token.tagDefaultColor\n      },\n      [`${token.componentCls}-close-icon`]: {\n        marginInlineStart: iconMarginInline,\n        color: token.colorTextDescription,\n        fontSize: token.tagIconSize,\n        cursor: 'pointer',\n        transition: `all ${token.motionDurationMid}`,\n        '&:hover': {\n          color: token.colorTextHeading\n        }\n      },\n      [`&&-has-color`]: {\n        borderColor: 'transparent',\n        [`&, a, a:hover, ${token.iconCls}-close, ${token.iconCls}-close:hover`]: {\n          color: token.colorTextLightSolid\n        }\n      },\n      [`&-checkable`]: {\n        backgroundColor: 'transparent',\n        borderColor: 'transparent',\n        cursor: 'pointer',\n        '&:not(&-checked):hover': {\n          color: token.colorPrimary,\n          backgroundColor: token.colorFillSecondary\n        },\n        '&:active, &-checked': {\n          color: token.colorTextLightSolid\n        },\n        '&-checked': {\n          backgroundColor: token.colorPrimary,\n          '&:hover': {\n            backgroundColor: token.colorPrimaryHover\n          }\n        },\n        '&:active': {\n          backgroundColor: token.colorPrimaryActive\n        }\n      },\n      [`&-hidden`]: {\n        display: 'none'\n      },\n      // To ensure that a space will be placed between character and `Icon`.\n      [`> ${token.iconCls} + span, > span + ${token.iconCls}`]: {\n        marginInlineStart: paddingInline\n      }\n    })\n  };\n};\n// ============================== Export ==============================\nexport default genComponentStyleHook('Tag', token => {\n  const {\n    fontSize,\n    lineHeight,\n    lineWidth,\n    fontSizeIcon\n  } = token;\n  const tagHeight = Math.round(fontSize * lineHeight);\n  const tagFontSize = token.fontSizeSM;\n  const tagLineHeight = tagHeight - lineWidth * 2;\n  const tagDefaultBg = token.colorFillAlter;\n  const tagDefaultColor = token.colorText;\n  const tagToken = mergeToken(token, {\n    tagFontSize,\n    tagLineHeight,\n    tagDefaultBg,\n    tagDefaultColor,\n    tagIconSize: fontSizeIcon - 2 * lineWidth,\n    tagPaddingHorizontal: 8 // Fixed padding.\n  });\n\n  return [genBaseStyle(tagToken), genTagColorStyle(tagToken), genTagStatusStyle(tagToken, 'success', 'Success'), genTagStatusStyle(tagToken, 'processing', 'Info'), genTagStatusStyle(tagToken, 'error', 'Error'), genTagStatusStyle(tagToken, 'warning', 'Warning')];\n});"],"mappings":"AAAA,SAASA,qBAAqB,EAAEC,UAAU,EAAEC,YAAY,QAAQ,sBAAsB;AACtF,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,SAASC,cAAc,QAAQ,aAAa;AAC5C,MAAMC,iBAAiB,GAAG,CAACC,KAAK,EAAEC,MAAM,EAAEC,eAAe,KAAK;EAC5D,MAAMC,0BAA0B,GAAGN,UAAU,CAACK,eAAe,CAAC;EAC9D,OAAO;IACL,CAAE,GAAEF,KAAK,CAACI,YAAa,IAAGH,MAAO,EAAC,GAAG;MACnCI,KAAK,EAAEL,KAAK,CAAE,QAAOE,eAAgB,EAAC,CAAC;MACvCI,UAAU,EAAEN,KAAK,CAAE,QAAOG,0BAA2B,IAAG,CAAC;MACzDI,WAAW,EAAEP,KAAK,CAAE,QAAOG,0BAA2B,QAAO;IAC/D;EACF,CAAC;AACH,CAAC;AACD;AACA,MAAMK,gBAAgB,GAAGR,KAAK,IAAIJ,YAAY,CA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